package com.example.bodyinfo.service;

import com.example.bodyinfo.dao.infoManagerReponsitory;
import com.example.bodyinfo.model.PageResult;
import com.example.bodyinfo.model.infoManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class InfoManagerService {
    @Autowired
    private infoManagerReponsitory reponsitory;
    public PageResult findById(){
        PageResult<infoManager> result=new PageResult<infoManager>();
        result.setCode(0);
        List<infoManager> list = reponsitory.findAll();
        result.setData(list);
        return result;
    }
}
